import request from '@/utils/request'

// 查询考试配置列表
export function listExam(query) {
  return request({
    url: '/exam/manager/list',
    method: 'get',
    params: query
  })
}

// 查询考试配置详细
export function getExam(id) {
  return request({
    url: '/exam/manager/' + id,
    method: 'get'
  })
}

// 新增考试配置
export function addExam(data) {
  return request({
    url: '/exam/manager',
    method: 'post',
    data: data
  })
}

// 修改考试配置
export function updateExam(data) {
  return request({
    url: '/exam/manager',
    method: 'put',
    data: data
  })
}

// 删除考试配置
export function delExam(id) {
  return request({
    url: '/exam/manager/' + id,
    method: 'delete'
  })
}

//获取考试学生配置关联名称
export function getStuConfigName(type, id) {
  return request({
    url: '/exam/manager/getStuConfigName/' + type + '/' + id,
    method: 'get'
  })
}

//修改发布状态
export function changePublish(id, status) {
  return request({
    url: '/exam/manager/changePublish/' + id + '/' + status,
    method: 'put'
  })
}
